/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mygraph;

/**
 *
 * @author sara
 */
public class Rectange extends Circle{

    int width;

    public Rectange(int width, int r) {
        super(r);
        this.width = width;
    }

    /**
     *
     * @return
     */
    @Override
    public double area()
    {
        return r*width;
    }

    public double circum()
    {
        return (r+width)*2;
    }
    @Override
    public String toString() {
        return "Rectange{" + "width=" + width + ",height="+super.r + '}'+ "\narea:"+this.area()+"\ncircum:"+this.circum() ;
    }
    
    
}
